cmake_minimum_required(VERSION 3.25)

project(hlp_sei_player)

set(BUILD_APP_NAME hlp_sei_player)

set(CMAKE_FLAGS_COMMON_DEBUG "-O0 -DDEBUG -g -Wall")
set(CMAKE_FLAGS_COMMON_RELEASE "-Os")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

# set(BUILD_SHARED_LIBS OFF)
# set(CMAKE_WIN32_EXECUTABLE TRUE)   # 去掉注释不显示控制台信息

# set(CMAKE_PREFIX_PATH "D:/tools/msys64/mingw64/bin")
# set(CMAKE_EXE_LINKER_FLAGS "-static")
find_package(Qt6 COMPONENTS
  Core
  Gui
  Charts
  Widgets
  Network
  Multimedia
  MultimediaWidgets
  REQUIRED)

# find_package(OpenCV REQUIRED)
include_directories(
  .
)

# 资源文件
set(RESOURCES_FILE ${CMAKE_CURRENT_SOURCE_DIR}/res/hlp_sei_player.qrc)
qt6_add_resources(RESOURCES_FILE_SRC ${RESOURCES_FILE})

add_executable(${BUILD_APP_NAME}
  main.cpp
  mainwindow.cpp
  mainwindow.h
  mainwindow.ui
  CtrlFileList.h
  CtrlFileList.cpp
  CMediaFile.h
  CMediaFile.cpp
  CVRender.h
  CVRender.cpp
  CtrlScreen.h
  CtrlScreen.cpp
  CtrlConvData.cpp
  CtrlConvData.h
  GenOpt.h
  GenOpt.cpp
  CtrlRadarChart.h
  CtrlRadarChart.cpp
  CAppCtx.cpp
  CAppCtx.h
  CRadarTest.h
  CRadarTest.cpp
  CtrlDataTest.h
  CtrlDataTest.cpp
  CTestReport.h
  CTestReport.cpp
  CtrlMsg.h
  CtrlMsg.cpp
  CVideoTest.h
  CVideoTest.cpp
  CtrlCfg.h
  CtrlCfg.cpp
  ${RESOURCES_FILE_SRC}
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../radar_detect)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../3rd/Qslog)
target_link_libraries(${BUILD_APP_NAME}
  Qt6::Core
  Qt6::Gui
  Qt6::Charts
  Qt6::Widgets
  Qt6::Network
  Qt6::Multimedia
  Qt6::MultimediaWidgets

  avformat
  avcodec
  avutil
  avdevice
  swscale
  swresample
  sdl2
  radar_detect
  Qslog
)

